<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="java.net.*"%>
<%
String basePath = request.getContextPath();
Map<String, Object> model = (Map<String, Object>)request.getAttribute("model");
Map<String, Object> param = (Map<String, Object>)model.get("_param");
int register_info = (Integer) model.get("register_info");
%>
<!DOCTYPE html>
<html>  
	<head>
		<title>注册跳转</title>
		<link href="<%=basePath%>/web/resources/css/global.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
		var index = 2;
		function auto_jump() {
			document.getElementById("index_value").innerHTML = index--;
			if(index <= 0) index = 0;
		}
		setInterval('auto_jump()',1000); 
		</script>
	</head>
  
<body>  
<%
String url = "#";
if(register_info > 0) {
%>
	<p>注册成功， 页面将 <span id="index_value" style="color:red">3</span> 秒钟实现跳转。</p>
<%
	url = basePath + "/index.jsp";
	response.setHeader("refresh","3;url=" + url);
} else {
%>
	<p>注册失败， 页面将 <span id="index_value" style="color:red">3</span> 秒钟实现跳转。</p>
<%
	String username = param.containsKey("username") ? URLEncoder.encode(param.get("username").toString(),"utf-8") : "";
	String realname = param.containsKey("realname") ? URLEncoder.encode(param.get("realname").toString(),"utf-8") : "";
	String mobile = param.containsKey("mobile") ? URLEncoder.encode(param.get("mobile").toString(),"utf-8") : "";
	String address = param.containsKey("address") ? URLEncoder.encode(param.get("address").toString(),"utf-8") : "";
	String email = param.containsKey("email") ? URLEncoder.encode(param.get("email").toString(),"utf-8") : "";
	url = basePath + "/p100011.html?username=" + username + "&realname=" + realname + "&mobile=" + mobile + "&address=" + address + "&email=" + email;
	response.setHeader("refresh","3;url=" + url);
}
%>  
 <p>否则点击<a href="<%=url%>" style="color:#FFCC00">此处跳转</a></p>  
</body>  
</html>